KILLED



    


Runtime Complexity (full) proof of /tmp/tmpgjN_ba/2.29.xml


(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

prime(0) → false
prime(s(0)) → false
prime(s(s(x))) → prime1(s(s(x)), s(x))
prime1(x, 0) → false
prime1(x, s(0)) → true
prime1(x, s(s(y))) → and(not(divp(s(s(y)), x)), prime1(x, s(y)))
divp(x, y) → =(rem(x, y), 0)

Rewrite Strategy: FULL

(1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
prime1(x, s(s(y))) →+ and(not(divp(s(s(y)), x)), prime1(x, s(y)))
gives rise to a decreasing loop by considering the right hand sides subterm at position [1].
The pumping substitution is [y / s(y)].
The result substitution is [ ].

(2) BOUNDS(n^1, INF)

(3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

prime(0') → false
prime(s(0')) → false
prime(s(s(x))) → prime1(s(s(x)), s(x))
prime1(x, 0') → false
prime1(x, s(0')) → true
prime1(x, s(s(y))) → and(not(divp(s(s(y)), x)), prime1(x, s(y)))
divp(x, y) → ='(rem(x, y), 0')

S is empty.
Rewrite Strategy: FULL

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

TRS:
Rules:
prime(0') → false
prime(s(0')) → false
prime(s(s(x))) → prime1(s(s(x)), s(x))
prime1(x, 0') → false
prime1(x, s(0')) → true
prime1(x, s(s(y))) → and(not(divp(s(s(y)), x)), prime1(x, s(y)))
divp(x, y) → ='(rem(x, y), 0')

Types:
prime :: 0':s → false:true:and
0' :: 0':s
false :: false:true:and
s :: 0':s → 0':s
prime1 :: 0':s → 0':s → false:true:and
true :: false:true:and
and :: not → false:true:and → false:true:and
not :: =' → not
divp :: 0':s → 0':s → ='
=' :: rem → 0':s → ='
rem :: 0':s → 0':s → rem
hole_false:true:and1_0 :: false:true:and
hole_0':s2_0 :: 0':s
hole_not3_0 :: not
hole_='4_0 :: ='
hole_rem5_0 :: rem
gen_false:true:and6_0 :: Nat → false:true:and
gen_0':s7_0 :: Nat → 0':s

(7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
prime1

(8) Obligation:

TRS:
Rules:
prime(0') → false
prime(s(0')) → false
prime(s(s(x))) → prime1(s(s(x)), s(x))
prime1(x, 0') → false
prime1(x, s(0')) → true
prime1(x, s(s(y))) → and(not(divp(s(s(y)), x)), prime1(x, s(y)))
divp(x, y) → ='(rem(x, y), 0')

Types:
prime :: 0':s → false:true:and
0' :: 0':s
false :: false:true:and
s :: 0':s → 0':s
prime1 :: 0':s → 0':s → false:true:and
true :: false:true:and
and :: not → false:true:and → false:true:and
not :: =' → not
divp :: 0':s → 0':s → ='
=' :: rem → 0':s → ='
rem :: 0':s → 0':s → rem
hole_false:true:and1_0 :: false:true:and
hole_0':s2_0 :: 0':s
hole_not3_0 :: not
hole_='4_0 :: ='
hole_rem5_0 :: rem
gen_false:true:and6_0 :: Nat → false:true:and
gen_0':s7_0 :: Nat → 0':s

Generator Equations:
gen_false:true:and6_0(0) ⇔ false
gen_false:true:and6_0(+(x, 1)) ⇔ and(not(='(rem(0', 0'), 0')), gen_false:true:and6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

The following defined symbols remain to be analysed:
prime1